<?php
class search extends items
{
	
	/* 关键词 */
	public function keyword()
	{
		$controller = lib::getitem('controller');
		@$keyword = $controller->params[0];
		if(isset($keyword)){
			
		}
	}
	
	/* 标签 */
	public function tag()
	{
	$controller = lib::getitem('controller');
		@$tag = $controller->params[0];
		if(isset($tag)){
			$this->item->tag = $tag;
			
			$items = new itemscollection($this->item);
			$items->setkey();
			
			$items->getcount();
			
			$items->search();
		}
		
		@$this->currentpage = $controller->params[1];
		
	}
	
	/* 高级搜索 */
	public function advance()
	{
		
	}
	
	/* 显示结果 */
	//public function show($items, $pagenav)
	//{
	//	echo view::show('items/search',
	//					array(	'type'=>$this->item->type,
	//							'items'=>$items,
	//							'pagenav'=>$pagenav));
	//}
}